from matplotlib import pyplot as plt
import numpy as np

# line plot
X=np.linspace(-2*np.pi,2*np.pi,1000)
y1=np.sin(X)
y2=np.cos(X)
plt.plot(X,y1,color='r',linestyle='--',linewidth=2,alpha=0.8)
plt.plot(X,y2,color='b',marker='+')
plt.show()
# scatter
x=np.random.rand(100)
y=np.random.rand(100)
colors=np.random.rand(100)
size=np.random.normal(50,60,100)
plt.scatter(x,y,s=size,c=colors,marker='*',alpha=0.8,edgecolors='black')
plt.show()
# pie chart
label=['Cat','Dog','Cattle','Sheep','Horse']
color=['red','green','red','green','yellow']
size=[1,2,3,4,5]
explode=(0,0,0,0,0.2)
plt.pie(size,colors=color,explode=explode,labels=label,shadow=True,autopct='%1.1f%%')
plt.axis('equal')
plt.show()
